package ressource;

public class CadreProduit {

	private Integer id;
	private String intitule;
	private String type;
	private String description;
	private String photo;
	private Integer prixMin;
	private Integer nbAnnonces;
	private Integer annonceLiee;
	private Integer venteLiee;
	
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getIntitule() {
		return intitule;
	}
	public void setIntitule(String intitule) {
		this.intitule = intitule;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public String getPhoto() {
		return photo;
	}
	public void setPhoto(String photo) {
		if(photo.isEmpty())
			this.photo = "visuel.png";
		else
			this.photo = photo;
	}
	/**
	 * @return the prixMin
	 */
	public Integer getPrixMin() {
		return prixMin;
	}
	/**
	 * @param prixMin the prixMin to set
	 */
	public void setPrixMin(Integer prixMin) {
		if(prixMin == 0)
			this.prixMin = null;
		else
			this.prixMin = prixMin;
	}
	/**
	 * @return the nbAnnonces
	 */
	public Integer getNbAnnonces() {
		return nbAnnonces;
	}
	/**
	 * @param nbAnnonces the nbAnnonces to set
	 */
	public void setNbAnnonces(Integer nbAnnonces) {
		this.nbAnnonces = nbAnnonces;
	}
	/**
	 * @return the annonceLiee
	 */
	public Integer getAnnonceLiee() {
		return annonceLiee;
	}
	/**
	 * @param annonceLiee the annonceLiee to set
	 */
	public void setAnnonceLiee(Integer annonceLiee) {
		this.annonceLiee = annonceLiee;
	}
	/**
	 * @return the venteLiee
	 */
	public Integer getVenteLiee() {
		return venteLiee;
	}
	/**
	 * @param venteLiee the venteLiee to set
	 */
	public void setVenteLiee(Integer venteLiee) {
		this.venteLiee = venteLiee;
	}
}
